package com.itlong.cloud.operate.resource;

import com.itlong.cloud.POJO.DTO.operate.ParkingRecordPageDTO;
import com.itlong.cloud.POJO.VO.operate.OperateFixedCarFeeRecordVO;
import com.itlong.cloud.POJO.VO.operate.OperateTemporaryCarFeeRecordVO;
import com.itlong.cloud.operate.service.IOperateParkingFeeRecordService;
import com.itlong.cloud.paymenthub.IOperateParkingFeeRecordServiceClient;
import com.itlong.cloud.utils.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <desc>
 *      运营-智慧停车-停车缴费记录暴露接口实现类.
 * </desc>
 *
 * @createDate 2018/11/5
 */
@RestController
public class OperateParkingFeeRecordServiceResource implements IOperateParkingFeeRecordServiceClient{

    @Autowired
    IOperateParkingFeeRecordService operateParkingFeeRecordService;

    /**
     * <desc>
     *      固定车缴费记录分页查询
     * <desc/>
     *
     * @param feeRecordDTO 分页查询参数
     * @return 分页列表数据
     * @author Juguang.S
     * @createDate 2018/11/5
     */
    @Override
    @PostMapping(path = "/operate/parking/getFixedCarFeeRecordPage")
    public Page<OperateFixedCarFeeRecordVO> getFixedCarFeeRecordPage(@RequestBody ParkingRecordPageDTO feeRecordDTO) throws Exception {
        return operateParkingFeeRecordService.getFixedCarFeeRecordPage(feeRecordDTO);
    }

    /**
     * <desc>
     *      临时车缴费记录分页查询
     * <desc/>
     *
     * @param feeRecordDTO 分页查询参数
     * @return 标准返回结果
     * @author Juguang.S
     * @createDate 2018/11/5
     */
    @Override
    @PostMapping(path = "/operate/parking/getTemporaryCarFeeRecordPage")
    public Page<OperateTemporaryCarFeeRecordVO> getTemporaryCarFeeRecordPage(@RequestBody ParkingRecordPageDTO feeRecordDTO) throws Exception {
        return operateParkingFeeRecordService.getTemporaryCarFeeRecordPage(feeRecordDTO);
    }
}